package com.ap.generator.requestorigination;

import com.ap.core.cxf.jaxb.common.TxChannelEnum;
import com.ap.core.cxf.jaxb.requestorigin.AbstractRequestOriginationTypeGeneratorBuilder;
import com.ap.datagen.core.GeneratorHelper;

import static com.ap.datagen.core.GeneratorHelper.buildA;
import static com.ap.datagen.core.GeneratorHelper.randomGeneratorFromEnum;
import static com.ap.datagen.core.Nullable.nullable;
import static com.ap.generator.requestorigination.DeviceInfoTypeGeneratorBuilder.deviceInforTypeGenerator;

public class RequestOriginationTypeGeneratorBuilder extends
		AbstractRequestOriginationTypeGeneratorBuilder {

	@Override
	public void setupDefaults() {
		this.txChannelGenerator = nullable(randomGeneratorFromEnum(TxChannelEnum.MOBAP));
		this.deviceInfoGenerator = nullable(buildA(deviceInforTypeGenerator()));
	}

	public static RequestOriginationTypeGeneratorBuilder requestOriginationGenerator() {
		return new RequestOriginationTypeGeneratorBuilder();
	}
	
	public RequestOriginationTypeGeneratorBuilder withTxChannel(TxChannelEnum value) {
		this.txChannelGenerator = nullable(GeneratorHelper.fixedValueGenerator(value));
		return this;
	}
}
